package JavaTest02.java;

public class SXH {
    public static void main(String[] args) {

        for (int i=100;i<1000;i++){
            int units = i % 10;
            int tens = (i / 10) % 10;
            int hundreds = i / 100;
            int  max = Math.max(i,i);

            if (hundreds*hundreds*hundreds+tens*tens*tens+units*units*units==i) {
                System.out.println("水仙花数为"+i);
                System.out.println("最大水仙花数为"+max);
            }

        }

    }
}
